<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>注册 - 在线OJ</title>
    <link rel="stylesheet" href="../css/register.css">
    <script src="../js/register.js"></script>
</head>

<body>
    <!-- 导航栏 -->
    <div class="navbar">
        <div class="left">
            <a href="/">首页</a>
            <a href="/all_questions.html">编程题库</a>
        </div>
        <div class="center">
            <a href="/html/job_seek.html">求职</a>
            <a href="/html/learning.html">学习</a>
            <a href="/html/discuss.html">讨论</a>
            <a href="/html/question_bank.html">知识题库</a>
            <a href="/html/ai_qa.html">AI问答</a>
        </div>
        <div class="right">
            <a href="/html/register.html">注册</a>
            <a href="/html/login.html">登录</a>
            <a href="/html/userInfo.html" class="toRight">个人信息</a>
        </div>
    </div>
    <div class="container">


        <!-- 注册表单区域 -->
        <div class="content">
            <h1>用户注册</h1>
            <p>创建一个账户以参与更多功能。</p>

            <div class="register-form">
                <form id="register-form" action="/api/register" method="post">
                    <input type="text" id="username" name="username" placeholder="用户名" required>
                    <input type="email" id="email" name="email" placeholder="电子邮件" required>
                    <input type="password" id="password" name="password" placeholder="密码" required>
                    <button type="submit" class="btn-primary">注册</button>
                    <button type="button" class="btn-secondary"
                        onclick="window.location.href='/login.html';">返回登录</button>
                </form>
                <div id="response-message" class="response-message"></div>
            </div>
        </div>
    </div>

</body>

</html>